/*
 * Jdwp.h
 *
 *  Created on: 2011-8-3
 *      Author: gexiao
 */

#ifndef JDWP_H_
#define JDWP_H_
#include <pthread.h>
#include <stdbool.h>
struct JdwpState;       /* opaque */
typedef struct JdwpState JdwpState;
/*
 * How we talk to the debugger.
 */
typedef enum JdwpTransportType {
    kJdwpTransportUnknown = 0,
    kJdwpTransportSocket,       /* transport=dt_socket */
    kJdwpTransportAndroidAdb,   /* transport=dt_android_adb */
} JdwpTransportType;


/*
 * Holds collection of JDWP initialization parameters.
 */
typedef struct JdwpStartupParams {
    JdwpTransportType transport;
    bool        server;
    bool        suspend;
    char        host[64];
    short       port;
    /* more will be here someday */
} JdwpStartupParams;

/*
 * Return the debugger thread's handle, or 0 if the debugger thread isn't
 * running.
 */
pthread_t dvmJdwpGetDebugThread(JdwpState* state);

/*
 *
 */
void dvmJdwpClearWaitForEventThread(JdwpState* state);
#endif /* JDWP_H_ */
